/***********************************************************
 *     momain.c
 *
 *     该文件由MWorks.Sysplorer嵌入式代码生成器自动生成。
 *
 *     模型名称：SECModel1
 *     生成时间：2023-11-13 10:05:08
 *
 *     苏州同元软控信息技术有限公司
 *              2005-2023
 *
 ***********************************************************/

#include "momodel.h"

/**
 * @brief  Main function
 * @param  None.
 * @retval 0 if succeeds; -1 if error.
 */
MoInt main(void)
{

  /* BEGIN: assign value to the input variables of the model */

  /* END:   assign value to the input variables of the model */

  /* initialize the model */
  if (mwStatusOk != SECModel1_Init())
  {
    return -1;
  }

  /* BEGIN: use output variables of the model,
            such as printing them out or assigning them to other variables */

  /* END:   use output variables of the model,
            such as printing them out or assigning them to other variables */

  MoInt i = 0;              /* circle index in the for-loop */
  MoInt circleNumber = 100; /* variable that control the total number of cycles */

  for (; i < circleNumber; ++i)
  {
    /* BEGIN: assign value to the input variables of the model */

    /* END:   assign value to the input variables of the model */

    /* perform a simulation step */
    if (mwStatusOk != SECModel1_DoStep())
    {
      return -1;
    }

    /* BEGIN: use output variables of the model,
              such as printing them out or assigning them to other variables */

    /* END:   use output variables of the model,
              such as printing them out or assigning them to other variables */
  }
  return 0;
}

/*----------------------------------------- E.N.D -----------------------------------------*/
